<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>考生管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <script type="text/javascript" src="../../js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="../../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../js/examUser.js"></script>
    <link type="text/css" href="../../css/bootstrap.min.css" rel="stylesheet">
    <link type="text/css" href="../../css/main.css" rel="stylesheet">
    <style type="text/css">
        th, td {
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        xmp{
            margin: 0px;
            padding: 0px;
            white-space: pre-wrap;
            word-wrap: break-word;
            width:100%;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div id="top-bar" class="col-xs-12">
            <div class="col-lg-4 col-lg-offset-8 col-sm-7 col-sm-offset-5 col-md-5 col-md-offset-7 col-xs-12"
                 id="top-bar-link">
                <span style="cursor:pointer" onclick="javascript:window.open('../../index.html')">前台首页</span>
                <span style="cursor:pointer" onclick="javascript:window.open('../manager.html','_self')">后台首页</span>
                <span>当前用户：</span>
                <span id="currentUser">Loading...</span>
                <span id="logout" style="cursor:pointer">退出</span>
            </div>
        </div>

        <div class="col-xs-12" id="head-bar">
            <div class="col-sm-8 col-sm-offset-2 col-xs-12">
                <h1 class="text-center">OEXAME·后台管理</h1>
            </div>
        </div>
    </div>
</div>

<div class="container">
    <div class="row">
        <div class="col-xs-12" style="margin-top: 20px;">
            <h3><span class="glyphicon glyphicon-option-vertical"></span><span>考生管理</span></h3>
            <hr/>
        </div>

        <div class="col-xs-12">
            <label>考试名称：<span id="title">Loading</span></label><br/>
            <label>考试时间：<span id="time">Loading</span></label><br/>
            <label>开始时间：<span id="startTime">Loading</span></label><br/>
            <label>结束时间：<span id="endTime">Loading</span></label><br/>
            <hr/>
        </div>

        <div class="modal fade" id="userList" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">用户列表</h4>
                    </div>
                    <div class="modal-body">

                        <div class="alert alert-info col-xs-12 text-center" role="alert" id="loading">载入中...</div>
                        <div class="alert alert-info col-xs-12 text-center" role="alert" id="saving"
                             style="display: none">保存中...
                        </div>
                        <div class="alert alert-info col-xs-12 text-center" role="alert" id="save-success"
                             style="display: none">保存成功
                        </div>
                        <form class="form-inline text-center">

                            <div class="form-group">
                                <label for="id">ID：</label>
                                <input type="text" id="id" name="id" class="form-control input-sm"/>
                            </div>
                            <div class="form-group">
                                <label for="name">姓名：</label>
                                <input id="name" name="name" class="form-control input-sm"/>
                            </div>
                            <div class="form-group">
                                <label for="department">部门（班级）：</label>
                                <input id="department" name="department" class="form-control input-sm"/>
                            </div>
                            <div class="form-group">
                                <a href="javascript:getUserList();" class="btn btn-default btn-primary btn-sm">搜索</a>
                                <button type="reset" class="btn btn-default btn-sm">重置</button>
                            </div>

                        </form>
                        <table class="table table-bordered table-hover" style='table-layout:fixed;margin-top: 10px'>
                            <thead>
                            <tr>
                                <th width="10%"><input type="checkbox" id="checkedAll" name="checkedAll"></th>
                                <th width="20%">ID</th>
                                <th width="30%">账号</th>
                                <th width="20%">姓名</th>
                                <th width="20%">部门（班级）</th>
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                    <div class="modal-footer">
                        <label><span id="page">0</span>/<span id="totalPage">0</span></label>
                        <a href="javascript:pagePrevious()" aria-label="Previous" class="btn btn-default">
                            <span aria-hidden="true" class="glyphicon glyphicon-menu-left"></span>
                        </a>
                        <a href="javascript:pageNext()" aria-label="Next" class="btn btn-default">
                            <span aria-hidden="true" class="glyphicon glyphicon-menu-right"></span>
                        </a>
                        <a href="javascript:userSave();" type="button" class="btn btn-primary" id="btn-info-save"
                           data-loading-text="保存中...">
                            添加
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-xs-12">

            <div class="alert alert-info col-xs-12 text-center" role="alert" id="delete-ing" style="display: none">
                删除中...
            </div>
            <div class="alert alert-success col-xs-12 text-center" role="alert" id="delete-success"
                 style="display: none">删除成功
            </div>
            <div class="alert alert-danger col-xs-12 text-center" role="alert" id="delete-fail" style="display: none">
                删除失败
            </div>

            <h3 class="text-center">考生列表</h3>
            <table class="table table-bordered table-hover" style='table-layout:fixed;' id="examUserList">
                <thead>
                <tr>
                    <th width="15%">ID</th>
                    <th width="20%">账号</th>
                    <th width="20%">姓名</th>
                    <th width="20%">部门(班级)</th>
                    <th width="15%">状态</th>
                    <th width="10%">操作</th>
                </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <div class="alert alert-info col-xs-12 text-center" role="alert" id="examUserLoading">载入中...</div>
            <div class="pull-right" style="margin-bottom: 30px">
                <a href="javascript:addExamUser();" class="btn btn-default btn-primary">添加考生</a>
            </div>
        </div>
    </div>
</div>
</body>
</html>